<template>
  <PcBlogsDetail v-if="isPC" :detail="blogsDetail"></PcBlogsDetail>
  <WebBlogsDetail v-else :detail="blogsDetail"></WebBlogsDetail>
</template>

<script>
import PcBlogsDetail from '@/views/pc/blogsDetail/index.vue'
import WebBlogsDetail from '@/views/web/blogsDetail/index.vue'
import { useConfig } from '@/stores/config.js'
import { getBlogsDetail } from '@/utils/mock.js'
export default {
  name: 'BlogsDetail',
  components: {
    PcBlogsDetail,
    WebBlogsDetail
  },
  data() {
    return {
      blogsDetail: {}
    }
  },
  computed: {
    isPC() {
      return useConfig().isPc
    }
  },
  mounted() {
    let id = this.$route.query.id
    if (id) {
      this.blogsDetail = getBlogsDetail(id)
      console.log(this.blogsDetail, '博客详情')
    }
  },
  methods: {}
}
</script>
<style lang="scss" scoped></style>
